import request from "@/utils/request";
// 调用权限
export default {
  getList(data) {
    return request({
      url: "/api/application/",
      method: "get",
      params: data
    });
  },
  toAdd(data) {
    return request({
      url: "/api/application/",
      method: "post",
      data
    });
  },
  toDelete(id) {
    return request({
      url: "/api/application/" + id + "/",
      method: "delete"
    });
  },
  toEdit(id, data) {
    return request({
      url: "/api/application/" + id + "/",
      method: "put",
      data
    });
  },
  getDetail(id) {
    return request({
      url: "/api/application/" + id + "/",
      method: "get"
    });
  },
  toFixPhoto(id, data) {
    return request({
      url: "/api/application/" + id + "/fix_photo/",
      method: "put",
      data
    });
  },
  toCancel(id, data) {
    return request({
      url: "/api/application/" + id + "/cancel/",
      method: "put",
      data
    });
  },
  addCallBack(data){
    return request({
      url: "/api/application/call_back/",
      method: "post",
      data
    });
  },
  editCallBack(id, data){
    return request({
      url: "/api/application/call_back/" + id + "/",
      method: "put",
      data
    });
  },
 delCallBack(id){
    return request({
      url: "/api/application/call_back/" + id + "/",
      method: "delete"
    });
  },
  getCallBack(id){
    return request({
      url: "/api/application/" + id + "/call_back/",
      method: "get"
    });
  },
  getDetailInfoById(id,data){
    return request({
      url: "/api/application/" + id + "/",
      method: "get",
      params: data
    });
  },
};
